package com.xbongbong.paas.redis;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * pojo中指明除项目名外的两项redis key构成项
 * 用此pojo能构造完整redis key
 * @author kaka
 * @version v1.0
 * @date 2021/1/26 17:23
 * @since v1.0
 */
@Setter
@Getter
@ToString
public class RedisKeyPojo implements Serializable {

    private static final long serialVersionUID = 7697501030326667813L;

    /**
     * 缓存key前缀
     */
    private String prefix;

    /**
     * 缓存key最后一部分
     */
    private String lastKey;

    public RedisKeyPojo(String prefix, String lastKey) {
        this.prefix = prefix;
        this.lastKey = lastKey;
    }

}
